/**
 * 获取key
 * 
 * 1.返回值
 * 包含key的数组
 * 
 * 2.触发拦截操作
 * Object.getOwnPropertyNames(proxy)
 * Object.getOwnPropertySymbols(proxy)
 * Reflect.ownKeys(proxy)
 * 
 * 
 */


const proxy = new Proxy({
    foo:'car',
    boo:'bar'
},{
    ownKeys(target){
        console.log('ownKeys()');
        return Reflect.ownKeys(...arguments)
    }
});

console.log(Object.getOwnPropertyNames(proxy))
//ownKeys()
//[ 'foo', 'boo' ]
console.log(Object.getOwnPropertySymbols(proxy))
//ownKeys()
//[]
console.log(Object.keys(proxy))
//ownKeys()
//[ 'foo', 'boo' ]
console.log(Reflect.ownKeys(proxy));
//ownKeys()
//[ 'foo', 'boo' ]
